using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EFDemo
{
    public class StudentMajor 
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
        public Major Major { get; set; }
        public Student Student { get; set; }

        public int MajorId { get; set; }

        public int StudentId { get; set; }
    }

    public class StudentMajor2
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        public string StudentName { get; set; }
        public string MajorName { get; set; }
    }

}
